<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
 
<%
// 添加属性方法setAttribute（名--String，对象--Object）

pageContext.setAttribute("a", "a");
%>
a:<%=pageContext.getAttribute("a") %>
</body>
</html>